class Solution {
    public int[] exchange(int[] nums) {
        int low = 0, fast = 0;
        while(fast < nums.length){
            if((nums[fast] & 1) == 1){
                int temp = nums[low];
                nums[low] = nums[fast];
                nums[fast] = temp;
                low++;
            }
            fast++;
        }
        return nums;
    }
}